/*
  wxTriangulator
    globals.hpp - primitives & typedefs used globally
  Copyright 2008 Boleslaw Kulbabinski

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include<vector>

using std::vector;

struct Point
{
	Point(){}
	Point(long _x, long _y):x(_x),y(_y){}
	long x;
	long y;

	bool operator==(const Point& p){ return p.x == x && p.y == y; }
};

struct Line
{
	Point A;
	Point B;
};

struct Fraction
{
	long numerator;
	long denominator;

	bool operator<(const Fraction& f){ return numerator * f.denominator < f.numerator * denominator; }
	bool operator==(const Fraction& f){ return numerator * f.denominator == f.numerator * denominator; }
};

typedef vector<Point>::const_iterator VP_c_iter;
typedef vector<Line>::const_iterator VL_c_iter;
